package com.webside.distinguish.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.webside.base.basemapper.BaseMapper;
import com.webside.distinguish.model.SeriesDistinguish;
import com.webside.distinguish.model.SeriesDistinguishKey;
import com.webside.interfaces.model.SeriesModel;
import com.webside.interfaces.model.SeriesVideoTree;

public interface SeriesDistinguishMapper extends BaseMapper<SeriesDistinguish, SeriesDistinguishKey> {
    int deleteByPrimaryKey(SeriesDistinguishKey key);

    int insert(SeriesDistinguish record);

    int insertSelective(SeriesDistinguish record);

    SeriesDistinguish selectByPrimaryKey(SeriesDistinguishKey key);

    int updateByPrimaryKeySelective(SeriesDistinguish record);

    int updateByPrimaryKey(SeriesDistinguish record);

    List<SeriesDistinguish> selectByDistinguishId(Long distinguishId);
    
    int deleteBatchById(@Param("distinguishId")Long distinguishId,@Param("list")List<String> ids);
    
    List<SeriesModel> selectSeriesListByAppid(@Param("appid")String appid, @Param("channel")String channel,@Param("start")Integer start);
    List<SeriesModel> selectOfflineSeriesListByAppid(@Param("appid")String appid, @Param("channel")String channel,@Param("start")Integer start);

    int selectCountByAppid(@Param("appid")String appid, @Param("channel")String channel);
    int selectOfflineCountByAppid(@Param("appid")String appid, @Param("channel")String channel);
    
    int isSeriesIndistinguish(@Param("seriesId")Integer seriesId, @Param("appid")String appid);

    SeriesVideoTree selectBySeriesId(@Param("seriesId")Integer seriesId);
}
